package main

import (
	"net"
	"fmt"
)

func main() {
	//１．确定服务器ＩＰ地址
	service := "10.0.154.198:54321"
	tcpaddr, _ := net.ResolveTCPAddr("tcp4", service)
	//2.连接服务器
	tcpconn, _ := net.DialTCP("tcp", nil, tcpaddr)
	a:=""
	fmt.Scanf("%s", &a)
	n, _ := tcpconn.Write([]byte(a))
	fmt.Println(n)
	bs:=make([]byte,512)
	n,_=tcpconn.Read(bs)
	fmt.Println(string(bs[:n]))
	tcpconn.Close()

}
